﻿namespace JT809.GpsRedisConsumer.Common
{
    public class DateTimeCheck
    {
        public static bool getTimeSpan(string timeStart, string timeEnd, DateTime curretTime)
        {
            //判断当前时间是否在工作时间段内
            TimeSpan dspWorkingDayAM = DateTime.Parse(timeStart).TimeOfDay;
            TimeSpan dspWorkingDayPM = DateTime.Parse(timeEnd).TimeOfDay;
            TimeSpan dspNow = curretTime.TimeOfDay;
            if (dspNow > dspWorkingDayAM && dspNow < dspWorkingDayPM)
            {
                return true;
            }
            return false;
        }
    }
}
